package com.wxx.design.openclose;

/**
 * @author: Jetwang
 * @date: 2022/4/7 19:20
 * @description: Test 测试类
 * @version: 1.0
 */
public class Test {
    public static void main(String[] args) {
        Course course = new JavaDiscountCourse(1, "Java从零到零", 188d);
        System.out.println("课程id:" + course.getId());
        System.out.println("课程名称:" + course.getName());
        JavaDiscountCourse javaDiscountCourse = (JavaDiscountCourse) course;
        System.out.println("课程原始价格:" + javaDiscountCourse.getOriginPrice());
        System.out.println("课程打折后价格:" + course.getPrice());
    }
}
